<template>
  <view class="user">
    <login v-if="!token"></login>
    <user-info v-else></user-info>
  </view>
</template>

<script>
import setTabBarBadge from "@/mixin/setTabBarBadge";
import login from "@/pages/user/components/login/login.vue";
import userInfo from "@/pages/user/components/userInfo/userInfo.vue";
import {mapState} from "vuex";

export default {
  mixins: [setTabBarBadge],
  data() {
    return {};
  },
  computed: {
    ...mapState("userStore", ["token"])
  },
  components: {
    login,
    userInfo
  }
}
</script>

<style lang="scss">

</style>
